<?php
//开启session
session_start();

//清除存在session中的信息
unset($_SESSION['uname']);

//跳转到首页
echo "<script>alert('用户退出成功');window.location.href='{$_SERVER['HTTP_REFERER']}';</script>";
